package cn.stylefeng.guns.modular.ums.mapper;

import cn.stylefeng.guns.modular.ums.entity.ChatHistory;
import cn.stylefeng.guns.modular.ums.model.params.ChatHistoryParam;
import cn.stylefeng.guns.modular.ums.model.result.ChatHistoryResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 聊天记录表 Mapper 接口
 * </p>
 *
 * @author yzb
 * @since 2022-05-17
 */
public interface ChatHistoryMapper extends BaseMapper<ChatHistory> {

    /**
     * 查询单条数据，Specification模式
     *
     */
    ChatHistoryResult findBySpec(@Param("paramCondition") ChatHistoryParam paramCondition);

    /**
     * 获取列表
     *
     * @author yzb
     * @Date 2022-05-17
     */
    List<ChatHistoryResult> customList(@Param("paramCondition") ChatHistoryParam paramCondition);

    /**
     * 获取map列表
     *
     * @author yzb
     * @Date 2022-05-17
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") ChatHistoryParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author yzb
     * @Date 2022-05-17
     */
    Page<ChatHistoryResult> customPageList(@Param("page") Page page, @Param("paramCondition") ChatHistoryParam paramCondition);

    /**
     * 获取分页map列表
     *
     * @author yzb
     * @Date 2022-05-17
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") ChatHistoryParam paramCondition);

}
